<?php
Globals::requireClass('Table');

class VmoneyTable extends Table
{
	public static $defaultConfig = array(
		'table' => 'tb_vmoney'
	);
	
	public function getUserVmoneyCount($uid){
	    $uid = (int)$uid;
	    $sql = "select SUM(money) as money from tb_vmoney where uid = {$uid} ";
	    $this->database->query($sql);
	    $re = $this->database->fetch();
	    return $re['money'];
	}
}

Config::extend('VmoneyTable', 'Table');
